style.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. #board {
  2. position: relative;
  3. padding: 25px 32px 32px 32px;
  4. min-width: 270px;
  5. max-width: 1920px;
  6. margin: 0 auto;
  7. h1 {
  8. font-size: 22px;
  9. margin-bottom: 20px;
  10. }
  11. // 검색 조건
  12. .list-header, .list-footer {
  13. select, input[type="search"], input[type="radio"] {
  14. height: 34px;
  15. }
  16. input[type="radio"] {
  17. position: absolute;
  18. opacity: 0;
  19. pointer-events: none;
  20. }
  21. a, button {
  22. line-height: 34px;
  23. padding: 0 15px;
  24. }
  25. }
  26. // 상단 제어 버튼
  27. .list-header {
  28. display: grid;
  29. grid-template-columns: 1fr auto auto;
  30. gap: 7px;
  31. align-items: end;
  32. section:first-child {
  33. flex: 1 1 auto;
  34. min-width: 0;
  35. }
  36. article {
  37. overflow: hidden; // 넘치는 애들은 숨김
  38. white-space: nowrap; // 줄바꿈 방지
  39. text-overflow: ellipsis; // 필요 시 말줄임
  40. display: flex;
  41. gap: 0.5rem;
  42. overflow-x: auto;
  43. -webkit-user-select: none;
  44. user-select: none;
  45. cursor: grab;
  46. touch-action: pan-y;
  47. ul {
  48. display: flex;
  49. gap: 0.5rem;
  50. li {
  51. flex-shrink: 0;
  52. label {
  53. display: block;
  54. line-height: inherit;
  55. padding: 0.25rem 0.75rem;
  56. background: #f1f1f1;
  57. border-radius: 6px;
  58. white-space: nowrap;
  59. cursor: pointer;
  60. &:hover, &:focus {
  61. color: #c7511f;
  62. background: #e1e1e1;
  63. text-decoration: underline;
  64. }
  65. &.active {
  66. background: #000;
  67. color: #f1f1f1;
  68. }
  69. }
  70. }
  71. }
  72. }
  73. }
  74. // 하단 제어 버튼
  75. .list-footer {
  76. display: grid;
  77. grid-template-columns: 1fr auto;
  78. .search-toggle {
  79. display: none;
  80. }
  81. > section[aria-label='게시글 검색'] > form {
  82. display: flex;
  83. align-items: center;
  84. gap: 7px;
  85. }
  86. }
  87. @media (max-width: 576px) {
  88. .list-footer {
  89. grid-template-columns: auto 1fr auto;
  90. align-items: center;
  91. .search-toggle {
  92. grid-column: 1;
  93. display: inline-flex;
  94. align-items: center;
  95. justify-content: center;
  96. height: 100%;
  97. }
  98. > section[aria-label='게시글 검색'] {
  99. display: none;
  100. }
  101. > section[aria-label='글쓰기 버튼'] {
  102. grid-column: 3;
  103. }
  104. }
  105. }
  106. @media (max-width: 768px) {
  107. .list-footer {
  108. > section[aria-label='게시글 검색'] {
  109. form {
  110. padding-right: 7px;
  111. select {
  112. flex-grow: 0;
  113. }
  114. input {
  115. flex-grow: 1;
  116. }
  117. }
  118. }
  119. }
  120. }
  121. }